package cn.dataling.ai.enums;

import cn.dataling.ai.common.ExceptionCore;

public enum ChatModelEnum {

    DEEP_SEEK("deepseek", "openAiChatClient"),
    OLLAMA("ollama", "ollamaChatClient"),
    ;

    private final String modelName;
    private final String chatClient;

    ChatModelEnum(String modelName, String chatClient) {
        this.modelName = modelName;
        this.chatClient = chatClient;
    }

    /**
     * 获取服务名称
     *
     * @param modelName 模型名称
     * @return
     */
    public static String getChatClientName(String modelName) {
        for (ChatModelEnum value : values()) {
            if (value.modelName.equals(modelName)) {
                return value.chatClient;
            }
        }
        throw new ExceptionCore("不支持该模型");
    }

    public String getModelName() {
        return modelName;
    }

    public String getChatClient() {
        return chatClient;
    }
}
